<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
  <display-name>test1</display-name>
 
 
 
  <servlet>
    <servlet-name>Jersey REST Service</servlet-name>
    <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
    <init-param>
      <param-name>com.sun.jersey.config.property.package</param-name>
      <param-value>service</param-value>
    </init-param>
    <init-param>
        <param-name>com.sun.jersey.spi.container.ResourceFilters</param-name>
      <param-value>com.sun.jersey.api.container.filter.RolesAllowedResourceFilterFactory</param-value>
  </init-param>
    <load-on-startup>1</load-on-startup>
  </servlet>
  
  
  
  <servlet-mapping>
    <servlet-name>Jersey REST Service</servlet-name>
    <url-pattern>/*</url-pattern>
  </servlet-mapping>
<!--  web-resource-collection>
<web-resource-name>Secure1</web-resource-name>
<url-pattern>/ListAllObjects</url-pattern>
</web-resource-collection-->
  
<security-constraint>
<web-resource-collection>
<web-resource-name>Secure</web-resource-name>
<url-pattern>/authorize</url-pattern>
</web-resource-collection>
<web-resource-collection>
<web-resource-name>SecureGrant</web-resource-name>
<url-pattern>/accept</url-pattern>
</web-resource-collection>

<web-resource-collection>
<web-resource-name>SecureConfig</web-resource-name>
<url-pattern>/config</url-pattern>
<url-pattern>/home</url-pattern>
<url-pattern>/log</url-pattern>
</web-resource-collection>

<auth-constraint>
<role-name>manager</role-name>
</auth-constraint>
</security-constraint>

<login-config>
<auth-method>BASIC</auth-method>
<realm-name>VHome</realm-name>
</login-config>
<security-role>
<role-name>manager</role-name>
</security-role>

  
</web-app>